<?php echo $html->script("lib/jquery.datepicker.min.js");?>
<?php echo $html->script("lib/jquery.filestyle.js");?>
<?php echo $html->css("screen/jquery.datepicker.css");?>
<?php echo $html->css("screen/stocklist.css");?>
<script type="text/javascript">
$(document).ready(function(){
try{
	$(".datepicker" ).datepicker({
		"dateFormat": "yy-mm-dd",		
		onClose: function(dateText, inst) {
			if ($('#PressFirstOffDateMonth').val()!='')$('#datechose_overlay2').hide();
			if ($('#AvailableFromDate').val()!='')$('#datechose_overlay1').hide();
		}
	});
	$('.jqTransform').jqTransform({width:100});
}catch(e){
	alert(e);
}
});
</script>
<?php echo $this->element('menu', array("active" => "3.a"));?>
<ul class="breadcrumb">
        <li>
          <?php echo $this->Html->link(__('Press  ', true), array('action' => 'index'), array('class'=>'fist_link'));?>
        </li>
        <li>
          <a href="#" >Edit Status Press  </a>
        </li>
        <li>
          <a href="#" ><?php echo $this->data['Press']['name']?></a>
        </li>
</ul>	
<div id="content">
	<div class="flash_message">
		<h2><?php echo $session->read('Message.flash.message')?></h2>
	</div>
	<div class="stocklist_form">
	<?php echo $this->Form->create('Press',array('action' => 'edit_status','class'=>'form_status'));?>
		<?php echo $this->Form->hidden('id'); ?>
		<?php echo $this->Form->input('name',array('class'=>'w300')); ?>
		<span class="jqTransform"><?php echo $this->Form->input('status_id'); ?></span>
		<div style="clear:left"></div>
		<?php echo $this->Form->input('buy_price',array('label'=>'buy price ($)')); ?>
		<?php echo $this->Form->input('sell_price',array('label'=>'sell price ($)')); ?>
		<span class="jqTransform"><?php echo $this->Form->input('sell_type_id'); ?></span>
		<div class="input checkbox"><?php echo $this->Form->label('active'); ?><?php echo $this->Form->checkbox('active'); ?></div>
		<div style="clear:left"></div>
		<div class="input datetime required">
			<label for="AvailableFromDate">Available From Date</label>
			<div onclick="this.style.display='none';$('#AvailableFromDate').focus();" id="datechose_overlay1" class="overlay"></div>
			<input onblur="if ($(this).val()=='')$('#datechose_overlay1').show();" class="datepicker" id="AvailableFromDate" name="data[Press][available_from_date]" value="<?php echo substr($this->data['Press']['available_from_date'],0,10); ?>" type="text" />
		</div>
		<div style="clear:left"></div>
		<div class="input datetime required">
			<label for="PressFirstOffDateMonth">First Off Date</label>
			<div onclick="this.style.display='none';$('#PressFirstOffDateMonth').focus();" id="datechose_overlay2" class="overlay"></div>
			<input onblur="if ($(this).val()=='')$('#datechose_overlay2').show();" class="datepicker" id="PressFirstOffDateMonth" name="data[Press][first_off_date]" value="<?php echo substr($this->data['Press']['first_off_date'],0,10); ?>" type="text" />
		</div>
		<span class="jqTransform"><?php echo $this->Form->input('condition'); ?></span>
		<div style="clear:left"></div>
		<?php echo $this->Form->button('Save',array('name'=>'submit','class'=>'bt','style'=>'margin-left:100px;margin-top:10px;')); ?>
		<?php echo $this->Form->button('Cancel',array('name'=>'cancel','class'=>'bt','style'=>'margin-left:20px;margin-top:10px;')); ?>
	<?php echo $form->end();?>
	</div>
</div>